3.357 \(\int \cot ^3(c+d x) (a+b \sec (c+d x))^n \, dx\)

Optimal. Leaf size=279 \[ \frac {(a+b \sec (c+d x))^{n+1} \, _2F_1\left (1,n+1;n+2;\frac {a+b \sec (c+d x)}{a-b}\right )}{2 d (n+1) (a-b)}+\frac {(a+b \sec (c+d x))^{n+1} \, _2F_1\left (1,n+1;n+2;\frac {a+b \sec (c+d x)}{a+b}\right )}{2 d (n+1) (a+b)}-\frac {(a+b \sec (c+d x))^{n+1} \, _2F_1\left (1,n+1;n+2;\frac {b \sec (c+d x)}{a}+1\right )}{a d (n+1)}-\frac {b (a+b \sec (c+d x))^{n+1} \, _2F_1\left (2,n+1;n+2;\frac {a+b \sec (c+d x)}{a-b}\right )}{4 d (n+1) (a-b)^2}+\frac {b (a+b \sec (c+d x))^{n+1} \, _2F_1\left (2,n+1;n+2;\frac {a+b \sec (c+d x)}{a+b}\right )}{4 d (n+1) (a+b)^2} \]

[Out]

1/2*hypergeom([1, 1+n],[2+n],(a+b*sec(d*x+c))/(a-b))*(a+b*sec(d*x+c))^(1+n)/(a-b)/d/(1+n)+1/2*hypergeom([1, 1+
n],[2+n],(a+b*sec(d*x+c))/(a+b))*(a+b*sec(d*x+c))^(1+n)/(a+b)/d/(1+n)-hypergeom([1, 1+n],[2+n],1+b*sec(d*x+c)/
a)*(a+b*sec(d*x+c))^(1+n)/a/d/(1+n)-1/4*b*hypergeom([2, 1+n],[2+n],(a+b*sec(d*x+c))/(a-b))*(a+b*sec(d*x+c))^(1
+n)/(a-b)^2/d/(1+n)+1/4*b*hypergeom([2, 1+n],[2+n],(a+b*sec(d*x+c))/(a+b))*(a+b*sec(d*x+c))^(1+n)/(a+b)^2/d/(1
+n)

________________________________________________________________________________________

Rubi [A]  time = 0.23, antiderivative size = 279, normalized size of antiderivative = 1.00, number of steps used = 10, number of rules used = 5, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.238, Rules used = {3885, 961, 68, 65, 831} \[ \frac {(a+b \sec (c+d x))^{n+1} \, _2F_1\left (1,n+1;n+2;\frac {a+b \sec (c+d x)}{a-b}\right )}{2 d (n+1) (a-b)}+\frac {(a+b \sec (c+d x))^{n+1} \, _2F_1\left (1,n+1;n+2;\frac {a+b \sec (c+d x)}{a+b}\right )}{2 d (n+1) (a+b)}-\frac {(a+b \sec (c+d x))^{n+1} \, _2F_1\left (1,n+1;n+2;\frac {b \sec (c+d x)}{a}+1\right )}{a d (n+1)}-\frac {b (a+b \sec (c+d x))^{n+1} \, _2F_1\left (2,n+1;n+2;\frac {a+b \sec (c+d x)}{a-b}\right )}{4 d (n+1) (a-b)^2}+\frac {b (a+b \sec (c+d x))^{n+1} \, _2F_1\left (2,n+1;n+2;\frac {a+b \sec (c+d x)}{a+b}\right )}{4 d (n+1) (a+b)^2} \]

Antiderivative was successfully verified.

[In]

Int[Cot[c + d*x]^3*(a + b*Sec[c + d*x])^n,x]

[Out]

(Hypergeometric2F1[1, 1 + n, 2 + n, (a + b*Sec[c + d*x])/(a - b)]*(a + b*Sec[c + d*x])^(1 + n))/(2*(a - b)*d*(
1 + n)) + (Hypergeometric2F1[1, 1 + n, 2 + n, (a + b*Sec[c + d*x])/(a + b)]*(a + b*Sec[c + d*x])^(1 + n))/(2*(
a + b)*d*(1 + n)) - (Hypergeometric2F1[1, 1 + n, 2 + n, 1 + (b*Sec[c + d*x])/a]*(a + b*Sec[c + d*x])^(1 + n))/
(a*d*(1 + n)) - (b*Hypergeometric2F1[2, 1 + n, 2 + n, (a + b*Sec[c + d*x])/(a - b)]*(a + b*Sec[c + d*x])^(1 +
n))/(4*(a - b)^2*d*(1 + n)) + (b*Hypergeometric2F1[2, 1 + n, 2 + n, (a + b*Sec[c + d*x])/(a + b)]*(a + b*Sec[c
 + d*x])^(1 + n))/(4*(a + b)^2*d*(1 + n))

Rule 65

Int[((b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[((c + d*x)^(n + 1)*Hypergeometric2F1[-m, n +
 1, n + 2, 1 + (d*x)/c])/(d*(n + 1)*(-(d/(b*c)))^m), x] /; FreeQ[{b, c, d, m, n}, x] &&  !IntegerQ[n] && (Inte
gerQ[m] || GtQ[-(d/(b*c)), 0])

Rule 68

Int[((a_) + (b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[((b*c - a*d)^n*(a + b*x)^(m + 1)*Hype
rgeometric2F1[-n, m + 1, m + 2, -((d*(a + b*x))/(b*c - a*d))])/(b^(n + 1)*(m + 1)), x] /; FreeQ[{a, b, c, d, m
}, x] && NeQ[b*c - a*d, 0] &&  !IntegerQ[m] && IntegerQ[n]

Rule 831

Int[(((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_)))/((a_) + (c_.)*(x_)^2), x_Symbol] :> Int[ExpandIntegrand[(
d + e*x)^m, (f + g*x)/(a + c*x^2), x], x] /; FreeQ[{a, c, d, e, f, g}, x] && NeQ[c*d^2 + a*e^2, 0] &&  !Ration
alQ[m]

Rule 961

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))^(n_)*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIn
tegrand[(d + e*x)^m*(f + g*x)^n*(a + c*x^2)^p, x], x] /; FreeQ[{a, c, d, e, f, g}, x] && NeQ[e*f - d*g, 0] &&
NeQ[c*d^2 + a*e^2, 0] && (IntegerQ[p] || (ILtQ[m, 0] && ILtQ[n, 0])) &&  !(IGtQ[m, 0] || IGtQ[n, 0])

Rule 3885

Int[cot[(c_.) + (d_.)*(x_)]^(m_.)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(n_), x_Symbol] :> -Dist[(-1)^((m - 1
)/2)/(d*b^(m - 1)), Subst[Int[((b^2 - x^2)^((m - 1)/2)*(a + x)^n)/x, x], x, b*Csc[c + d*x]], x] /; FreeQ[{a, b
, c, d, n}, x] && IntegerQ[(m - 1)/2] && NeQ[a^2 - b^2, 0]

Rubi steps

\begin {align*} \int \cot ^3(c+d x) (a+b \sec (c+d x))^n \, dx &=\frac {b^4 \operatorname {Subst}\left (\int \frac {(a+x)^n}{x \left (b^2-x^2\right )^2} \, dx,x,b \sec (c+d x)\right )}{d}\\ &=\frac {b^4 \operatorname {Subst}\left (\int \left (\frac {(a+x)^n}{4 b^3 (b-x)^2}+\frac {(a+x)^n}{b^4 x}-\frac {(a+x)^n}{4 b^3 (b+x)^2}-\frac {x (a+x)^n}{b^4 \left (-b^2+x^2\right )}\right ) \, dx,x,b \sec (c+d x)\right )}{d}\\ &=\frac {\operatorname {Subst}\left (\int \frac {(a+x)^n}{x} \, dx,x,b \sec (c+d x)\right )}{d}-\frac {\operatorname {Subst}\left (\int \frac {x (a+x)^n}{-b^2+x^2} \, dx,x,b \sec (c+d x)\right )}{d}+\frac {b \operatorname {Subst}\left (\int \frac {(a+x)^n}{(b-x)^2} \, dx,x,b \sec (c+d x)\right )}{4 d}-\frac {b \operatorname {Subst}\left (\int \frac {(a+x)^n}{(b+x)^2} \, dx,x,b \sec (c+d x)\right )}{4 d}\\ &=-\frac {\, _2F_1\left (1,1+n;2+n;1+\frac {b \sec (c+d x)}{a}\right ) (a+b \sec (c+d x))^{1+n}}{a d (1+n)}-\frac {b \, _2F_1\left (2,1+n;2+n;\frac {a+b \sec (c+d x)}{a-b}\right ) (a+b \sec (c+d x))^{1+n}}{4 (a-b)^2 d (1+n)}+\frac {b \, _2F_1\left (2,1+n;2+n;\frac {a+b \sec (c+d x)}{a+b}\right ) (a+b \sec (c+d x))^{1+n}}{4 (a+b)^2 d (1+n)}-\frac {\operatorname {Subst}\left (\int \left (-\frac {(a+x)^n}{2 (b-x)}+\frac {(a+x)^n}{2 (b+x)}\right ) \, dx,x,b \sec (c+d x)\right )}{d}\\ &=-\frac {\, _2F_1\left (1,1+n;2+n;1+\frac {b \sec (c+d x)}{a}\right ) (a+b \sec (c+d x))^{1+n}}{a d (1+n)}-\frac {b \, _2F_1\left (2,1+n;2+n;\frac {a+b \sec (c+d x)}{a-b}\right ) (a+b \sec (c+d x))^{1+n}}{4 (a-b)^2 d (1+n)}+\frac {b \, _2F_1\left (2,1+n;2+n;\frac {a+b \sec (c+d x)}{a+b}\right ) (a+b \sec (c+d x))^{1+n}}{4 (a+b)^2 d (1+n)}+\frac {\operatorname {Subst}\left (\int \frac {(a+x)^n}{b-x} \, dx,x,b \sec (c+d x)\right )}{2 d}-\frac {\operatorname {Subst}\left (\int \frac {(a+x)^n}{b+x} \, dx,x,b \sec (c+d x)\right )}{2 d}\\ &=\frac {\, _2F_1\left (1,1+n;2+n;\frac {a+b \sec (c+d x)}{a-b}\right ) (a+b \sec (c+d x))^{1+n}}{2 (a-b) d (1+n)}+\frac {\, _2F_1\left (1,1+n;2+n;\frac {a+b \sec (c+d x)}{a+b}\right ) (a+b \sec (c+d x))^{1+n}}{2 (a+b) d (1+n)}-\frac {\, _2F_1\left (1,1+n;2+n;1+\frac {b \sec (c+d x)}{a}\right ) (a+b \sec (c+d x))^{1+n}}{a d (1+n)}-\frac {b \, _2F_1\left (2,1+n;2+n;\frac {a+b \sec (c+d x)}{a-b}\right ) (a+b \sec (c+d x))^{1+n}}{4 (a-b)^2 d (1+n)}+\frac {b \, _2F_1\left (2,1+n;2+n;\frac {a+b \sec (c+d x)}{a+b}\right ) (a+b \sec (c+d x))^{1+n}}{4 (a+b)^2 d (1+n)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 7.01, size = 256, normalized size = 0.92 \[ \frac {\cot ^2(c+d x) \left (a+b \sqrt {\sec ^2(c+d x)}\right ) (a+b \sec (c+d x))^n \left ((a-b) \left (a (a-b) (2 a-b (n-2)) \tan ^2(c+d x) \, _2F_1\left (1,n+1;n+2;\frac {a+b \sqrt {\sec ^2(c+d x)}}{a+b}\right )-2 (a+b) \left (2 \left (a^2-b^2\right ) \tan ^2(c+d x) \, _2F_1\left (1,n+1;n+2;\frac {\sqrt {\sec ^2(c+d x)} b}{a}+1\right )+a (n+1) \left (a-b \sqrt {\sec ^2(c+d x)}\right )\right )\right )+a (a+b)^2 (2 a+b (n-2)) \tan ^2(c+d x) \, _2F_1\left (1,n+1;n+2;\frac {a+b \sqrt {\sec ^2(c+d x)}}{a-b}\right )\right )}{4 a d (n+1) (a-b)^2 (a+b)^2} \]

Warning: Unable to verify antiderivative.

[In]

Integrate[Cot[c + d*x]^3*(a + b*Sec[c + d*x])^n,x]

[Out]

(Cot[c + d*x]^2*(a + b*Sec[c + d*x])^n*(a + b*Sqrt[Sec[c + d*x]^2])*(a*(a + b)^2*(2*a + b*(-2 + n))*Hypergeome
tric2F1[1, 1 + n, 2 + n, (a + b*Sqrt[Sec[c + d*x]^2])/(a - b)]*Tan[c + d*x]^2 + (a - b)*(a*(a - b)*(2*a - b*(-
2 + n))*Hypergeometric2F1[1, 1 + n, 2 + n, (a + b*Sqrt[Sec[c + d*x]^2])/(a + b)]*Tan[c + d*x]^2 - 2*(a + b)*(a
*(1 + n)*(a - b*Sqrt[Sec[c + d*x]^2]) + 2*(a^2 - b^2)*Hypergeometric2F1[1, 1 + n, 2 + n, 1 + (b*Sqrt[Sec[c + d
*x]^2])/a]*Tan[c + d*x]^2))))/(4*a*(a - b)^2*(a + b)^2*d*(1 + n))

________________________________________________________________________________________

fricas [F]  time = 0.74, size = 0, normalized size = 0.00 \[ {\rm integral}\left ({\left (b \sec \left (d x + c\right ) + a\right )}^{n} \cot \left (d x + c\right )^{3}, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)^3*(a+b*sec(d*x+c))^n,x, algorithm="fricas")

[Out]

integral((b*sec(d*x + c) + a)^n*cot(d*x + c)^3, x)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (b \sec \left (d x + c\right ) + a\right )}^{n} \cot \left (d x + c\right )^{3}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)^3*(a+b*sec(d*x+c))^n,x, algorithm="giac")

[Out]

integrate((b*sec(d*x + c) + a)^n*cot(d*x + c)^3, x)

________________________________________________________________________________________

maple [F]  time = 1.13, size = 0, normalized size = 0.00 \[ \int \left (\cot ^{3}\left (d x +c \right )\right ) \left (a +b \sec \left (d x +c \right )\right )^{n}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(d*x+c)^3*(a+b*sec(d*x+c))^n,x)

[Out]

int(cot(d*x+c)^3*(a+b*sec(d*x+c))^n,x)

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (b \sec \left (d x + c\right ) + a\right )}^{n} \cot \left (d x + c\right )^{3}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)^3*(a+b*sec(d*x+c))^n,x, algorithm="maxima")

[Out]

integrate((b*sec(d*x + c) + a)^n*cot(d*x + c)^3, x)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.00 \[ \int {\mathrm {cot}\left (c+d\,x\right )}^3\,{\left (a+\frac {b}{\cos \left (c+d\,x\right )}\right )}^n \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(c + d*x)^3*(a + b/cos(c + d*x))^n,x)

[Out]

int(cot(c + d*x)^3*(a + b/cos(c + d*x))^n, x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a + b \sec {\left (c + d x \right )}\right )^{n} \cot ^{3}{\left (c + d x \right )}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)**3*(a+b*sec(d*x+c))**n,x)

[Out]

Integral((a + b*sec(c + d*x))**n*cot(c + d*x)**3, x)

________________________________________________________________________________________